<?php
/**
 * Created by JetBrains PhpStorm.
 * File: CategoryMode.class.php
 * User: Xnfy520@gmail.com
 * Date: 12-3-13
 * Time: 下午8:01
 */

	class ProductsModel extends RelationModel{

//		protected $_link = array(
//			'Article'=>array(
//				'mapping_type'=>HAS_MANY,
//				'mapping_name'=>'article',
//				'class_name'=>'Article',
//				'foreign_key'=>'categoryid',
//			),
//		);

		protected $_validate = array(

			array('name', 'require', '产品分类名不能为空', 1),
			array('sort', 'number', '排序必须为数字', 1),
			//	array('name', '2, 7', '分组名长度不能少于2位, 大于7位', 1, 'length'),

		);

		protected $_auto = array(
			array('created', 'time',1 , 'function'),
		);

	}